from framework.syntacticSugar.EventEntiys import EventEntiys


def close_chart(event_entiys: EventEntiys):
    point = event_entiys.selfposister
    assert point is not None
    detainee = event_entiys.involver

    detainee.fields.in_jail = "True"
    detainee.fields.posiste = point  # 将我们的犯人关在我们的地盘~~
    print(f"[runtime: jail-mod] 角色: {detainee}被关押！")


def put_pit(event_entiys: EventEntiys):
    detainee = event_entiys.involver
    mod_str = str(detainee.fields.mod)

    if ",地牢," in mod_str:
        ...


def va_put_pit(e) -> bool:
    """
    判断是否可以关入牢中
    :param e:
    :return:
    """
    detainee = e.involver
    mod_str = str(detainee.fields.mod)
    if ",地牢," in mod_str:
        # 角色本身就在地牢中
        return False
    
    return True
